package com.es.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * 描述:
 * es-meta-
 *
 * @author Derek
 * @create 2021-11-29 10:06
 */
@Controller
@RequestMapping("/student")
public class StudentController {

    @RequestMapping("/save")
    public String save(HttpSession session, HttpServletRequest request){
        //
        if(session.getAttribute("currentUser") == null){
            request.setAttribute("msg","请先登录");
            return "redirect:/login.jsp";
        }else{
            //
            return "student";
        }
    }
}
